<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            position: relative;
            text-align: center;
        }

        body>.small {
            display: inline-block;
        }

        body>.big {
            position: absolute;
            top: 0;
            left: 0;
            width: 300px;
            height: 300px;
            display: none;
        }
    </style>
    <script>
        /*
			当鼠标移入页面小图时，在鼠标右侧展示对应大图，
            鼠标移入、移出、移动、事件将对应图片加载到正确位置展示各10分
		*/
        /* 在这里填写jquery代码，禁止修改html代码 */
		  window.onload=function(){
		     var imgs = document.querySelectorAll("img");
		     var big = document.querySelector(".big");
		       for (let i = 0; i< imgs.length; i++) {
		           imgs[i].onmousemove = function (e){
		               big.style.top=e.y + 10 + "px";
		               big.style.left=e.x + 10 + "px";
		               big.src=this.src;
		           }
		           imgs[i].onmouseout = function (){
		               big.style.display="none";
		           }
		           imgs[i].onmouseenter = function (){
		               big.style.display="block";
		           }
		       }
		        }


    </script>
</head>

<body>
    <img class="small" src="./img/toplist_a01.jpg" alt="">
    <img class="small" src="./img/toplist_a02.jpg" alt="">
    <img class="small" src="./img/toplist_a03.jpg" alt="">
    <img class="big" src="./img/toplist_a01.jpg" alt="">
</body>

</html>